@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap');

/* 整体表单样式 */
.form-container {
  max-width: 500px;
  margin: 100px auto;
  padding: 40px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
}

/* 表单标题样式 */
.form-title {
  text-align: center;
  margin-bottom: 40px;
  color: #333;
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 700;
}

/* 表单输入项样式 */
.form-item {
  margin-bottom: 30px;
  position: relative;
}

/* 表单输入框样式 */
.form-input {
  width: 100%;
  padding: 15px;
  border: 2px solid #dcdcdc;
  border-radius: 5px;
  background-color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

/* 当输入框聚焦时改变边框颜色 */
.form-input:focus {
  border-color: rgb(128, 128, 255);
}

/* 表单标签样式 */
.form-label {
  position: absolute;
  top: -15px;
  left: 15px;
  padding: 0 5px;
  background-color: #f9f9f9;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #999;
  transition: top 0.3s, font-size 0.3s;
}

/* 当输入框获得焦点或内容不为空时，上移标签并变小字号 */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: -25px;
  font-size: 12px;
}

/* 表单提交按钮样式 */
.form-submit {
  width: 100%;
  padding: 15px;
  background-color: rgb(128, 128, 192);
  color: white;
  border: none;
  border-radius: 5px;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* 鼠标悬停在提交按钮时改变颜色 */
.form-submit:hover {
  background-color: #2980b9;
}

/* 错误消息样式 */
.error-message {
  margin-top: 5px;
  color: #e74c3c;
  font-size: 14px;
}